/**
 * Copyright (c)  HeiFeiDeFengZheng.Co.Ltd. All rights reserved.
 **/
package com.dexing.springbootconfig;

import com.dexing.springbootconfig.bean.ConfigBean;
import com.dexing.springbootconfig.bean.TestConfigBean;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

/**
 * 功能描述：
 *
 * @author huifeidefengzheng
 * @since 2024-01-02
 *
 **/
@SpringBootApplication
@EnableConfigurationProperties({ConfigBean.class, TestConfigBean.class})
public class Application {
    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(Application.class);
        /**
         * SpringApplication会默认将命令行选项参数转换为配置信息，（少量参数可以用这个）
         * 例如，启动时命令参数指定：
         *
         * java -jar myproject.jar --server.port = 9000
         * 从命令行指定配置项的优先级最高，不过你可以通过setAddCommandLineProperties来禁用
         *
         * SpringApplication.setAddCommandLineProperties(false).
         */
        app.setAddCommandLineProperties(false);
        app.run(args);
    }
}
